<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="uft-8">
    <title>JavaScript 简史</title>
    <style>
        #my-element {
            position: absolute;
            left: 500px;
            top: 100px;
        }
    </style>
</head>
<body>
<div id="my-element">This is my element</div>
<script>
    var netscape = document.layers['my-element'];
    var ie4 = document.all['my-element'];

    var netscapeLeft = document.layers['my-element'].left;
    var ie4Left = document.all['my-element'].leftpos;

    var xpos = document.getElementById('my-element').style.left;
</script>
</body>
</html>